//
//  MPFeedbackController.m
//  MarkPlatform
//
//  Created by xiao6 on 2017/12/18.
//  Copyright © 2017年 AT. All rights reserved.
//

#import "MPFeedbackController.h"

@interface MPFeedbackController ()

@property (nonatomic, strong) UIScrollView *scrollView;
@property (nonatomic, strong) UIView *feedbackView;

@end

@implementation MPFeedbackController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self showNavTitle:@"意见反馈" backItem:YES];
    [self layoutViews];
}

- (void)layoutViews {
    [self.view addSubview:self.scrollView];
    [self.scrollView addSubview:self.feedbackView];
    
    [self.scrollView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.bottom.left.right.offset(0);
    }];
    
    [self.feedbackView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.right.equalTo(@0);
        make.width.equalTo(@(SCREEN_WIDTH));
        make.height.equalTo(@(SCREEN_HEIGHT - NAVI_HIGHT));
    }];
}

#pragma mark - getters
- (UIScrollView *)scrollView {
    if (!_scrollView) {
        _scrollView = [[UIScrollView alloc] init];
        _scrollView.alwaysBounceVertical = YES;
    }
    return _scrollView;
}
- (UIView *)feedbackView {
    if (!_feedbackView) {
        _feedbackView = [[[NSBundle mainBundle] loadNibNamed:@"MPFeedbackView" owner:nil options:nil]firstObject];
    }
    return _feedbackView;
}

@end
